<?php
namespace app\common\exception;

use think\Exception;

class BaseException extends Exception
{
    public $msg;
    public $httpStatus;
    public $errorCode;
    public function __construct($data = [])
    {
        if (!is_array($data)) return;
        if (array_key_exists('msg', $data)) {
            $this->msg = $data['msg'];
        }
        if (array_key_exists('errorCode', $data)) {
            $this->errorCode = $data['errorCode'];
        }
    }
}
